package com.cookpan001
{
	import com.cookpan001.data.AppConst;
	import com.cookpan001.init.AppCommandsList;
	import org.puremvc.as3.interfaces.IFacade;
	import org.puremvc.as3.patterns.facade.Facade;
	
	public class ApplicationFacade extends Facade implements IFacade
	{	
		public static function getInstance():ApplicationFacade
		{
			return (instance ? instance : new ApplicationFacade()) as ApplicationFacade
		}
		
		override protected function initializeController():void 
		{
			super.initializeController();
			AppCommandsList.getInstance().init();
		}
		
		override public function sendNotification(notificationName:String, body:Object = null, type:String = null):void
		{
			//trace("Send " + notificationName);
			super.sendNotification(notificationName, body, type);
		}
		
		public function startup(stage:Object):void
		{
			sendNotification(AppConst.STARTUP, stage);
		}
		
	}

}